package com.yuanfeng.userms.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @ClassName UserInfoDetailController
 * @Description
 * @Author hyq
 * @Date 2023/7/18 11:40
 * @Version 1.0
 **/
@RestController
@RequestMapping("user/detail")
public class UserInfoDetailController extends BaseController{

    /**
     * 用户按月统计数量
     *
     * @param map
     * @return
     */
    @PostMapping("/userGroupingStatistics")
    public ResponseResult userGroupingStatistics(@RequestBody Map<String, Object> map) {
        ResponseResult result = userInfoDetailService.userGroupingStatistics(map);
        return result;
    }

    /**
     * 获取用户安全等级
     *
     * @param paraMap
     * @return
     */
    @PostMapping("/h5/getUserSecurityLevel")
    public ResponseResult getUserSecurityLevel(@RequestBody Map<String, String> paraMap) {
        ResponseResult result = userInfoDetailService.getUserSecurityLevel(paraMap);
        return result;
    }

    /**
     * 删除用户信息
     * @param userId
     * @return
     */
    @PostMapping("/h5/delUserInfo")
    public ResponseResult delUserInfo(@RequestParam String userId) {
        ResponseResult result =userInfoDetailService.delUserInfo(userId);
        return result;
    }

    /**
     * 更新昵称
     * @param paraMap
     * @return
     */
    @PostMapping("/h5/updateUserNickname")
    public ResponseResult updateUserNickname(@RequestBody Map<String, String> paraMap){
        ResponseResult result =userInfoDetailService.updateUserNickname(paraMap);
        return result;
    }
}
